<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择要结账的店铺  - ${web.name}${web.additionalTitle!}</title>
<link href="${root}/u/css/global.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/layout.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/checkout.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/memeber.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/buy.css" type="text/css" rel="stylesheet" />
<script src="${sysResRoot}/jquery.js" type="text/javascript"></script>
<script type="text/javascript"> 
var URLPrefix = {"url":"${base}"};
</script>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
	var price=0.0;
	var weight=0.0;
	var fee=0.0;
	var deliveryMethod;
	$("input[name='storeId']").each(function(){
		var storeId=parseInt(jQuery(this).val());
		$("#[id^='cart_weight_"+storeId+"_']").each(function(){
			weight+=parseFloat(jQuery(this).val());
			$("#cart_weight_"+storeId).html(weight);
		});
		$("#[id^='cart_price_"+storeId+"_']").each(function(){
			price+=parseFloat(jQuery(this).html());
			$("#cart_price_"+storeId).html(price);
		});
		deliveryMethod=$("#deliverMethodSelector_"+storeId).val();
		$("#cart_totalfee_"+storeId).html("");
		freight=$("#cart_freght_"+storeId).html();
		$("#cart_totalfee_"+storeId).html(price+freight);
		weight=0.0;
		price=0.0;
	});
	$("#cart_realfee").html("");
	$("#totalfee").val("");
	$("#[id^='cart_totalfee_']").each(function(){
		fee+=parseFloat(jQuery(this).html());
		$("#cart_realfee").html(fee);
		$("#totalfee").val(fee);
	});
});
</script>
</head>
<body>
[#include "../include/页头顶栏.html"/]
<div id="head">
	 [#include "../include/页头搜索栏.html"/]
    [#include "../include/页头导航栏.html"/]
</div>
<div id="checkoutUI" class="mt10">
   <div id="errorMsgDisplayDiv" style="z-index:1000;"></div>
    <form id="jvForm" action="../cart/checkout_shipping.jspx" method="post">
       <div id="receiver_buffer_window" class="delivery mb10">
    <ul class="step clearfix mt10">
        <li><span>STEP 1.</span>查看购物车</li><li class="on"><span>STEP 2.</span>选择店铺</li>
        <li><span>STEP 3.</span>确定认订单信息</li><li><span>STEP 4.</span>成功提交订单</li>
    </ul>
 </div>
 <div id="delivery_buffer_window" class="delivery mb10">
   <div class="title"><h2>确认订单信息</h2></div>
   <div class="delivery_box" id="inputUI_delivery">
    <table>
      <tr class="head">
        <td width="80"></td><td width="410">商品名称</td><td width="120" align="center">单价</td><td width="85" align="center">数　量</td>
        <td width="100" align="center">重量</td><td width="150" align="left">小计</td>
     </tr>
     [#if slist?size gt 0]
     [#list slist as store]
      <tr><td colspan="7">
           <div class="shop_name" align="left"> 
                  &nbsp;&nbsp;
                   <input type="radio" name="storeId" value="${store.id}" [#if store_index==0]checked[/#if] />
                                            店铺：${store.storeName!} &nbsp;&nbsp;卖家：${store.member.username!}
              </div> 
           </td>
       </tr>
       <tr><td colspan="7">
           <ul  class="clearfix mt10">
              [#list store.fullGives as fullGive]
              <li>${fullGive_index+1}. ${fullGive.name!}---${fullGive.description!}</li>
               [/#list]
          </ul>
           </td>
       </tr>
         
      [@cartItem_list storeId=store.id memberId=member.id]
           [#list tag_list as item]
       <tr class="body">
        <td width="70"><a class="img60" href="${item.product.url}" target="_blank">
                 <img src="${root!}${item.product.productExt.coverImg!}" width="60" height="60"/></a></td>
        <td width="310"><a href="${item.product.url}" title="${item.product.name!}" class="a2" target="_blank">
              [@text_cut s=item.product.name len='10' appent='...'/]
              [#if item.productFash??]${item.productFash.attitude!}[/#if]</a>
        </td>
        <td width="120" align="center">
          ¥[#if item.productFash??]
           [#if item.product.promote??]
            ${item.productFash.salePrice*item.product.promote.discount}
           [#else]
            ${item.productFash.salePrice!}
           [/#if]
          [#else]
           [#if item.product.promote??]
            ${item.product.salePrice*item.product.promote.discount}
           [#else]
              ${item.product.salePrice!}
           [/#if]
         [/#if]</td>
        <td width="65" align="center"><span id="cart_count_${store.id}_${item.id}">${item.count!0}</span></td>
        <td width="80" align="center">${item.count*item.product.productExt.weight!0}
         <input type="hidden" id="cart_weight_${store.id}_${item.id}" name="weight" value="${item.count*item.product.productExt.weight!0}"/>g</td>
        <td width="100" align="right">
        <span id="cart_price_${store.id}_${item.id}">
        [#if item.productFash??]
          [#if item.product.promote??]
           ${(item.productFash.salePrice*item.product.promote.discount)*item.count}
          [#else]
           ${item.productFash.salePrice*item.count!}
          [/#if]
        [#else]
          [#if item.product.promote??]
           ${(item.product.salePrice*item.product.promote.discount)*item.count}
          [#else]
            ${item.product.salePrice*item.count!}
          [/#if]
        [/#if]</span>
        </td>
    </tr>
     [/#list]
     [/@cartItem_list] 
    <tr><td colspan="7" align="right">
    <span class="bold">重量：<span id="cart_weight_${store.id}"></span>g
          商品金额：<span id="cart_price_${store.id}"></span>元&nbsp;&nbsp;
      店铺合计(不含运费，服务费)：¥ <span id="cart_totalfee_${store.id}"></span>
      <input type="hidden" name="totalFee" id="totalFee"/>
      </span></td></tr>
  [/#list]
  [/#if]
</table>
<table class="foot">
    <tr>
        <td rowspan="4" width="945" align="right">实际付款：¥ <span id="cart_realfee"></span></td>
    </tr>
</table>
</div>
</div>
<div class="delivery_box" id="inputUI_delivery">
    <p class="btn"><input type="submit" id="confirm_delivery" value="提交订单"/></p>
 </div>
</form>
</div>
[#include "../include/页脚信息栏.html"/]
</body>
</html>
